import { defAxios as request } from '@/utils/http'

/**
 * 构造物列表
 * @returns
 */
export const getStructureInformation = params => request({
  url: '/structure/getList',
  method: 'GET',
  params
})

/**
 * 构造物 - 分页
 * @returns
 */
export const getStructureIndex = params => request({
  url: '/structure/index',
  method: 'GET',
  params
})

/**
 * 新增 构造物
 * @param {*} params
 * @returns
 */
export const structureAdd = data => request({
  url: '/structure/add',
  method: 'POST',
  data
})

/**
 * 删除 构造物
 * @param {*} params
 * @returns
 */
export const structureDel = params => request({
  url: `/structure/delete/${params}`,
  method: 'DELETE'
})

/**
 * 编辑 构造物
 * @param {*} params
 * @returns
 */
export const structureEdit = data => request({
  url: '/structure/edit',
  method: 'PUT',
  data
})
/**
 * 构造物列表  GIS
 * @returns
 */
export const getStructureSection = data => request({
  url: '/structure/getLegInfo',
  method: 'GET',
  data
})
/**
 * 构造物问题  GIS
 * @returns
 */
export const getStructureQuestion = data => request({
  url: '/inspectionFile/getQuestionList',
  method: 'GET',
  data
})
